const form = [{
    key: 'pz',
    label: '品种',
    labelWidth: 80,
    required: true,
    placeholder: '请填写'
}, {
    key: 'dh',
    label: '代号',
    labelWidth: 80,
    required: false,
    placeholder: '请填写'
}, {
    key: 'dlqd_nnt',
    label: '断裂强度MPa',
    validatorNumber:true,
    labelWidth: 160,
    required: true,
    placeholder: '请填写'
},{
    key: 'dlscl_nnt',
    label: '断裂伸长率%',
    validatorNumber:true,
    labelWidth: 160,
    required: true,
    placeholder: '请填写'
}, {
    key: 'csml_nnt',
    label: '初始模量mpa',
    validatorNumber:true,
    labelWidth: 160,
    required: true,
    placeholder: '请填写'
}, {
    key: 'njxn',
    label: '耐碱性能（极限拉力保持率）',
    validatorNumber:true,
    labelWidth: 200,
    required: false,
    placeholder: '请填写'
},{
    key: 'dlqd_sj',
    label: '断裂强度MPa',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
}, {
    key: 'dlscl_sj',
    label: '断裂伸长率%',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
}, {
    key: 'csml_sj',
    label: '初始模量mpa',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
},{
    key: 'njxn',
    label: '耐碱性能（极限拉力保持率）',
    validatorNumber:true,
    labelWidth: 200,
    required: false,
    placeholder: '请填写'
},{
    key: 'zxbz',
    label: '执行标准',
    labelWidth: 80,
    required: true,
    placeholder: '请填写'
}]


const requiredArr = []
const notRequiredArr = []

let tempArr = []
form.forEach(item => {
    if(item.required) {
        tempArr.push(item)
    }else {
        notRequiredArr.push(item)
    }
    if( tempArr.length >= 2 ) {
        requiredArr.push(tempArr)
        tempArr = []
    }
})

if( tempArr.length > 0 ) {
    requiredArr.push(tempArr)
    tempArr = []
}

export default {
    requiredArr,
    notRequiredArr
};